package com.ict.ms.trackPlayBack.facade.common;

/**
 * Created by chitanda on 2017/10/29.
 */
public class AnnularSectorWithLongitudeCrossed180 extends CircularSectorWithLongitudeCrossed180{

    private double radiusInner;

    public AnnularSectorWithLongitudeCrossed180(double Longitude, double Latitude, double radiusInMeters, double startDirectionInDegree, double endDirectionInDegree, double radiusInnerInMeter) {
        super(Longitude,Latitude,radiusInMeters,startDirectionInDegree,endDirectionInDegree);
        radiusInner = radiusInnerInMeter;

    }

    @Override
    public boolean containsPoint(double lon, double lat) {
        if(!super.containsPoint(lon, lat)){
            return false;
        }
        double distanceFromCenterInKM=super.distenceFromCenter(lon,lat);
        if(distanceFromCenterInKM<radiusInner) //Inside the inner circular sector, outside the annular
            return false;
        else //inside the annular
            return true;
    }
}
